package org.jeecg.modules.business.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.manage.entity.CaishuiServiceTask;

import java.util.List;
import java.util.Map;

/**
 * @Description: 服务任务
 * @Author: yfkj
 * @Date:   2023-01-05
 * @Version: V1.0
 */
@InterceptorIgnore(tenantLine = "true")
public interface ServiceTaskMapper extends BaseMapper<CaishuiServiceTask> {

    /**
     * 获取固定签约服务类型列表
     * @return
     */
    @Select("select s.id as 'value',s.name as 'text' from caishui_signing_service s where s.status = 1 and s.fixed = 1")
    List<Map<String,Object>> getSigningServiceList();

    /**
     * 根据ID获取非固定签约服务类型列表
     * @return
     */
    @Select("select s.id as 'value',s.name as 'text' from caishui_signing_service s where s.status = 1 and s.fixed = 0 and s.id in(${ids})")
    List<Map<String,Object>> getSigningServiceListByIDs(@Param("ids") String ids);

}
